/**
 * FileName: lessonApi.js
 * Author:   Administrator
 * Date:     2021/4/18 9:21
 * Description:
 */
import request, {jsonRequest} from "./request";
const base = '/onlineclass-web/college';
const collegeApi = {

    getList(filterParam,sortParam,page,rows) {
        let url = base + '/list.json';
        return request.get(url, {
            params: {filterParam,sortParam,page,rows}
        })
    },

    getOne(id) {
        let url = base + '/findById.json';
        return request.get(url, {
            params: {id}
        })
    },

    deleteItem(id) {
        let url = base + '/delete.json';
        return request.get(url, {
            params: {id}
        })
    },

    addItem(data){
        let url = base + "/save.json";
        return jsonRequest.post(url,data);
    },
    addItemMajor(data){
        let url = base + "/saveMajor.json";
        return jsonRequest.post(url,data);
    },
    delMajor(id){
        let url = base + '/deleteMajor.json';
        return request.get(url, {
            params: {id}
        })
    }
}

export default collegeApi;